package com.example.demo.controller;

import com.example.demo.dao.StudentDaoImpl;
import com.example.demo.entity.Student;
import com.example.demo.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StudentController {

    @Autowired
    private StudentService studentService;

    @Autowired
    private StudentDaoImpl studentDao;



    @RequestMapping(value = "/queryStudentById",method = RequestMethod.GET)
    public Student queryStudentById(Integer id){

        return this.studentDao.queryStudentByid(id);
    }
}
